<block name="body">
    <head>
        <meta charset="UTF-8">
        <title>贝肯熊</title>
        <link rel="shortcut icon" href="http://www.beikenxiong.com.cn/favicon.ico?v=1443168547" />
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <!-- basic styles -->
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/app.css?v=1443168547" media="all" />
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/bootstrap_min.css?v=1443168547" media="all" />
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/bootstrap_responsive_min.css?v=1443168547" media="all" />
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/style.css?v=1443168547" media="all" />
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/themes.css?v=1443168547" media="all" />
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/inside.css?v=1443168547" media="all" />
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/official.css?v=1443168547" media="all" />
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/resource.css?v=1443168547" />
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/todc_bootstrap.css?v=1443168547" media="all" />
        <script type="text/javascript" src="/Public/Home/js/jQuery.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/inside.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/app/resource.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/applicationnew.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/bootstrap_min.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/jquery_bootbox.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/contextmenu/bootstrap_contextmenu.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/jquery_validate_min.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/validation/jquery_validate_methods.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/chosen_jquery_min.js?v=1443168547"></script>
        <script type="text/javascript" src="/Public/Home/js/form/jquery_form_min.js?v=1443168547"></script>
        <!--[if IE 7]>
        <link href="/Public/static/user/css/font_awesome_ie7.css?v=1443168547 rel="stylesheet" />
        <![endif]-->
        <!--[if lte IE 8]>
        <script src="/Public/static/user/js/excanvas_min.js?v=1443168547"></script>
        <![endif]-->
        <!--[if lte IE 9]>
        <script src="/Public/static/user/js/watermark.js?v=1443168547"></script>
        <![endif]-->

        <script src="/Public/Home/js/kindeditor-min.js?v=1443168547"></script>
        <script src="/Public/Home/js/zh_CN.js?v=1443168547"></script>
        <link href="/Public/Home/js/default.css?v=1443168547" rel="stylesheet" />


        <script type="text/javascript">
            var  STATIC = "/Public/static";
            var  ROOT = "";
        </script>
        <!-- 页面header钩子，一般用于加载插件CSS文件和代码 -->

    </head>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <div class="box">
                    <div class="box-title">
                        <div class="span10">
                            <h3><i class="icon-edit"></i>修改</h3>
                        </div>
                        <script>
                            function goBack()
                            {
                                window.history.back()
                            }
                        </script>
                        <div class="span2"><a class="btn" onclick="goBack()">返回</a></div>
                    </div>
                    <div class="box-content">

                        <!--
                                                    <ul class="nav nav-tabs">
                                                        <li class="active">
                                                            <a href="http://www.beikenxiong.com.cn/addon/Articles/Articles/lists">图文素材</a>
                                                        </li>                            </ul>
                        -->

                        <form id="form" action="{:U('basis/pictext_edit?id='.$testid)}" method="post" class="form-horizontal form-center">
                            <!--
                                                            <ul class="nav nav-tabs">
                                                                <li data-tab="tab1" class="active"><a href="#tab1" data-toggle="tab">图文素材</a></li>                                </ul>
                            -->
                            <div class="tab-content">
                                <div id="tab1" class="tab-pane in active">
                                    <!--
<label class="item-label">
<span class="need_flag">*</span>                                                        标题                                                        <span class="check-tips">
                                                            </span>
</label>
-->

                                    <div class="control-group">
                                        <label for="title" class="control-label">标题</label>
                                        <div class="controls">
                                            <input type="text" class="text input-xlarge"  name="headline" value="{$arr[0]['headline']}">
                                            <span class="need_flag"></span>                                </div>
                                    </div>                                                <!--
                                                    <label class="item-label">
                                                                                                                简介                                                        <span class="check-tips">
                                                                                                                    </span>
                                                    </label>
-->

                                    <div class="control-group">
                                        <label for="intro" class="control-label">简介</label>
                                        <div class="controls">
                                            <textarea name="intro" style="width: 580px; height: 100px">{$arr[0]["intro"]}</textarea>
                                        </div>
                                    </div>                                                <!--
                                                    <label class="item-label">
                                                                                                                封面图片                                                        <span class="check-tips">
                                                                                                                    </span>
                                                    </label>
-->

                                    <div class="control-group">
                                        <label for="cover" class="control-label">封面图片</label>
                                        <div class="controls">
                                            <img id="thumb_img_cover" type="img" src="" style="max-height:100px;" />
                                            <input type="hidden" id="thumb_cover" name="cover" value="0" class="input-medium" data-rule-url="true" />
                                            <a id="cover" class="btn insertimage">选择图片</a><span class="help-inline"></span>
                                        </div>
                                    </div>
                                    <script type="text/javascript">
                                        var arr = [];
                                        var picID;
                                        KindEditor.ready(function(K){
                                            var editor = K.editor({
                                                allowFileManager : true,
                                                fileManagerJson:"{:u('Home/Uploads/fileMgrJson?fold='.'duijiang')}",
                                                uploadJson:'{:u("home/uploads/uploadJson",array("type"=>3,"fold"=>"duijiang"))}',
                                                //extraFileUploadParams:{'uploadFilePath':'/rktdata/uploads/{m$token}'}
                                            });
                                            $('#cover').live('click', function(e){
                                                editor.loadPlugin('image', function(){
                                                    editor.plugin.imageDialog({
                                                        imageUrl: $(e.target).prev().val(),
                                                        clickFn: function(url, title, width, height, border, align, uploadFilePath){
                                                            arr = url.split("?");
                                                            picID = arr[1];
                                                            $(e.target).prev().val(picID);
                                                            if ('img' == $(e.target).prev().prev().attr('type')) {
                                                                $(e.target).prev().hide();
                                                                $(e.target).prev().prev().attr('src', url);
                                                                $(e.target).prev().prev().show();
                                                            }
                                                            editor.hideDialog();
                                                        }
                                                    });
                                                });
                                            });
                                        });
                                    </script>                                                <!--
                                                    <label class="item-label">
                                                                                                                内容                                                        <span class="check-tips">
                                                                                                                    </span>
                                                    </label>
-->

                                    <div class="control-group">
                                        <label for="content" class="control-label">内容</label>
                                        <div class="controls">
                                            <textarea name="deitcontent" data-rule-maxlength="200" style="width: 580px; height: 100px">{$arr[0]["deitcontent"]}</textarea>		<input type="hidden" name="content" value="">
                                            <link rel="stylesheet" href="/Public/static/kindeditor/default/default.css?v=1443168547" />
                                            <script charset="utf-8" src="/Public/static/kindeditor/kindeditor-min.js"></script>
                                            <script charset="utf-8" src="/Public/static/kindeditor/zh_CN.js?v=1443168547"></script>
                                            <script type="text/javascript">
                                                var editor;
                                                KindEditor.ready(function(K) {
                                                    editor = K.create('textarea[name="content"]', {
                                                        allowFileManager : true,
                                                        themesPath: K.basePath,
                                                        width: '100%',
                                                        height: '300px',
                                                        resizeType: 1,
                                                        pasteType : 2,
                                                        urlType : 'absolute',
                                                        fileManagerJson : 'http://www.beikenxiong.com.cn/Home/Uploads/fileMgrJson',
                                                        //uploadJson : 'http://www.beikenxiong.com.cn/addon/Articles/Articles/uploadJson' }
                                                        uploadJson : 'http://www.beikenxiong.com.cn/Home/Uploads/uploadJson'
                                                    });
                                                });

                                                $(function(){
                                                    //传统表单提交同步
                                                    $('textarea[name="content"]').closest('form').submit(function(){
                                                        editor.sync();
                                                    });
                                                    //ajax提交之前同步
                                                    $('button[type="submit"],#submit,.ajax-post').click(function(){
                                                        editor.sync();
                                                    });
                                                })
                                            </script>

                                            <span class="maroon"></span>
                                        </div>
                                    </div>                                                <!--
                                                    <label class="item-label">
                                                                                                                排序号                                                        <span class="check-tips">
                                                            （数值越小越靠前）                                                        </span>
                                                    </label>
-->

                                    <div class="control-group">
                                        <label for="sort" class="control-label">{$arr[0]["orderid"]}</label>
                                        <div class="controls">
                                            <input style="padding: 1px 1px ;" type="number" class="text input-medium" name="sort" value="0">
                                            <span  class="help-inline">数值越小越靠前</span>                                </div>
                                    </div>                                                <!--
                                                    <label class="item-label">
                                                                                                                图文外链                                                        <span class="check-tips">
                                                                                                                    </span>
                                                    </label>
-->

                                    <div class="control-group">
                                        <label for="url" class="control-label">图文外链</label>
                                        <div class="controls">
                                            <input  type="text" class="text input-xlarge"  name="txtimgurl" value="{$arr[0]['txtimgurl']}">
                                        </div>
                                    </div>                                                <!--
                                                    <label class="item-label">
                                                                                                                图文类型                                                        <span class="check-tips">
                                                                                                                    </span>
                                                    </label>
-->

                                    <div class="control-group">
                                        <label for="type" class="control-label">图文类型</label>
                                        <div class="controls">
                                            <select name="type" class="chosen-select input-medium" data-nosearch="true">
                                                <option value="自定义图文" class="toggle-data" toggle-data=""  >自定义图文</option><option value="微信素材图文" class="toggle-data" toggle-data="" selected="selected" >微信素材图文</option>                                    </select>
                                        </div>
                                    </div>                                                <!--
                                                    <label class="item-label">
                                                                                                                扩展字段                                                        <span class="check-tips">
                                                                                                                    </span>
                                                    </label>
-->

                                    <div class="control-group">
                                        <label for="extra" class="control-label">扩展字段</label>
                                        <div class="controls">
                                            <input type="text" class="text input-xlarge"  name="extend" value="{$arr[0]['extend']}">
                                        </div>
                                    </div>                                                                                                                                                                                        </div>                                </div>

                            <div id="res_block">
                                <div class="form-actions">
                                    <input type="hidden" name="id" value="89">
                                    <button type="submit" class="btn btn-primary" id="bsubmit">确 定</button>
                                    <a class="btn" href="{:U('Index/index')}">取消</a>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>